#include "widget.h"
#include "ui_widget.h"
#include<QPushButton>
#include<QVBoxLayout>
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    QPushButton* button1 = new QPushButton("按钮1",this);
    QPushButton* button2 = new QPushButton("按钮2",this);
    QPushButton* button3 = new QPushButton("按钮3",this);
    //垂直布局
    QVBoxLayout* lay = new QVBoxLayout(this);
    lay->addWidget(button1);
    lay->addWidget(button2);
    lay->addWidget(button3);
}

Widget::~Widget()
{
    delete ui;
}

